﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HtmlAgilityPack;

namespace Blue.Spider.Core.Extensions
{
    public static class HtmlNodeExtensions
    {
        public static IEnumerable<HtmlNode> ElementByClass(this HtmlNode node, string tagName, string className)
        {
            return node.Elements(tagName).Where(i => i.Attributes["class"].Value == className);
        }
    }
}
